<template>
	<view class="wo">
		<view class="message_top">
			<view class="message_top_title" :style="{top:computedTop}">系统消息</view>
			<view class="message_top_back" :style="{top:computedTop}" @click="Back">
				<image src="../../static/search/back.png" class="bfbimages"></image>
			</view>
		</view>

		<view class="wo_image flex">
			<image src="../../static/WoImgaes.png" class="bfbimages"></image>
		</view>

		<view class="wo_btn" @click="saoyisao">
			<view style="width: 26rpx;height: 26rpx;text-align: center;line-height: 26rpx;margin-right: 12rpx;"
				class="flex">
				<image src="../../static/sys.png" class="bfbimages"></image>
			</view>
			<text>扫一扫</text>
		</view>

		<view class="wo_btn1" @click="HeXiaoJl">
			<text>核销记录</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				menuButtonInfo: null,
			}
		},
		computed: {
			computedTop() {
				if (this.menuButtonInfo) {
					return `${this.menuButtonInfo.height * 2 - 6}px`;
				}
				return '0px';
			},
		},
		onLoad() {
			const info = uni.getMenuButtonBoundingClientRect();
			this.menuButtonInfo = info;
		},
		methods: {
			HeXiaoJl(){
				uni.navigateTo({
					url:'/pages/WriteOff/WriteOff_list'
				})
			},
			saoyisao(){
				uni.navigateTo({
					url:'/pages/WriteOff/WriteOff_OK'
				})
				return
				// 允许从相机和相册扫码
				uni.scanCode({
					success: function (res) {
						console.log('条码类型：' + res.scanType);
						console.log('条码内容：' + res.result);
					}
				});
			},
			Back() {
				uni.navigateBack()
			}
		}
	}
</script>

<style lang="scss">
	.wo {
		width: 100vw;
		height: 100vh;
		float: left;
		background-color: #FFFFFF;
	}

	.message_top {
		width: 100%;
		height: 200rpx;
		position: relative;

		.message_top_title {
			width: 100%;
			text-align: center;
			font-family: PingFang SC, PingFang SC;
			font-weight: bold;
			font-size: 36rpx;
			color: #333333;
			position: absolute;
			left: 0;
			z-index: 2;
		}

		.message_top_back {
			width: 44rpx;
			height: 44rpx;
			position: absolute;
			left: 30rpx;
			z-index: 9;
		}
	}

	.wo_image {
		width: 317rpx;
		height: 444rpx;
		margin: 90rpx auto 0;
		text-align: center;
		line-height: 444rpx;
	}

	.wo_btn,
	.wo_btn1 {
		width: 431rpx;
		height: 79rpx;
		background: linear-gradient(270deg, #FE4624 0%, #FF8143 100%);
		border-radius: 50rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: bold;
		font-size: 30rpx;
		color: #FFFFFF;
		text-align: center;
		line-height: 79rpx;
		margin: 80rpx auto 0;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.wo_btn1 {
		margin: 50rpx auto 0;
		background: #FFFFFF;
		color: #333333;
		border: 2rpx solid #999999;
	}
</style>